<div id="content">
	<div id="left">
		<?php echo $this->element('layouts/left'); ?>
	</div>
	<div id="mainContent">
		<div id="inside_banner">
			<?php echo $this->element('layouts/inside_banner'); ?>
		</div>
		<div class="block">
			<div class="title">Tìm kiếm chi tiết sản phẩm</div>
			<div class="text">
				<?php echo $form->create(array(
					'id'			=> 'formValidation', 
					'action' 		=> 'index', 
					'enctype' 		=> 'multipart/form-data', 
					'autocomplete'	=> 'off')); ?>
				<div class="input">
					<label>Từ khóa</label>
					<?php echo $this->Form->input('keyword', array('name'=> 'keyword','type' => 'text', 'label' => false, 'div' => false)); ?> 
				</div>
				<div class="input">
					<label>Danh mục</label>
					<?php
								echo $form->input(
								'product_type', 
								array(
									'type'		=> 'select', 
									'label'		=> false, 
									'div'		=> false, 
									'options'	=> $categories,
									'name'		=> 'product_type'
								)
							);
							?>
				</div>
				<div class="input">
				  <label><?php echo __('Tiêu chuẩn', true); ?></label>
				  <?php
								echo $form->input(
								'standard', 
								array(
									'type'		=> 'select', 
									'label'		=> false, 
									'div'		=> false, 
									'options'	=> $standard,
									'name'		=> 'standard'
								)
							);
					?>
				</div>
				<div class="input">
				  <label><?php echo __('Sản xuất', true); ?></label>
				  <?php
							echo $form->input(
								'sanxuat', 
								array(
									'type'		=> 'select', 
									'label'		=> false, 
									'div'		=> false, 
									'options'	=> $sanxuat,
									'name'		=> 'sanxuat'
								)
							);
					?>
				</div>
				<div class="input">
				  <label><?php echo __('Nguyên liệu', true); ?></label>
				  <?php
							echo $form->input(
								'nguyenlieu', 
								array(
									'type'		=> 'select', 
									'label'		=> false, 
									'div'		=> false, 
									'options'	=> $nguyenlieu,
									'name'		=> 'nguyenlieu'
								)
							);
					?> 
				</div>
				<div class="submit">
				  <?php echo $form->button('', array('class'=>'submit', 'type'=>'submit', 'id'=>'regSubmit')); ?>
					<?php echo $form->button('', array('class'=>'reset', 'type'=>'reset')); ?>
				</div>
				<?php echo $form->end(); ?>	
			</div>
			<?php
				if (!empty($detail)) {
			?>
				<div class="title">Kết quả</div>
				<div class="text"><strong style="color:#ff0000"><?php echo $result; ?></strong></div>
				<div class="text">
					<table width="100%">
					<?php 
						$i = 1;
						foreach ($detail as $item) {
							echo "<tr style='border-bottom:1px solid #ccc'>";
							echo "<td>".$i."</td>";
							echo "<td>".$detail['proName']."</td>";
							echo "<td>".$html->image(IMG_URL . $detail['img'],array('style'=>'width:120px; height:80px;'))."</td>";
							echo "</tr>";
							$i++;
						}
					?>
					</table>
				</div>
			<?php } ?>
		</div>
	</div>
	<div id="right">
		<?php echo $this->element('layouts/right'); ?>
	</div>
	<div style="clear: both;"></div>
</div>

